<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="always" name="referrer">
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- 移动端必须的设置 -->
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 禁用电话号码检测功能，禁止对数字随便可以拨号 -->
<meta name="format-detection" content="telephone=no">
<!-- 禁用E-mail检测功能 -->
<meta name="format-detection" content="email=no">
<!-- 禁用地址检测功能，禁止跳转到地图 -->
<meta name="format-detection" content="address=no">
<!-- 在苹果设备上以全屏方式打开本网页 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- 设置在苹果设备上状态的颜色，默认白色，要设置成什么颜色以Web颜色的风格而定 -->
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<title>途狗收油</title>
<script type="text/javascript" src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../js/base64.js"></script>
<script type="text/javascript" src="../js/layui/layui.js "></script>
<script type="text/javascript" src="../js/recycle/establish.js?v=1.7"></script>
<script type="text/javascript" src="../js/recycle/recyclebase.js"></script>
<script type="text/javascript" src="../vendor/resize.js?v=1.0"></script>
<link rel="stylesheet" href="../js/layui/css/layui.css" />
<link rel="stylesheet"
	href="../vendor/font-awesome/css/font-awesome.min.css" />
	<link rel="stylesheet" href="../vendor/iconfont/iconfont.css" />
<link rel="stylesheet" href="../css/basestyle.css" />
<link rel="stylesheet" href="../css/establish.css" />
</head>
<body>
<%@ include file="../basejsp.jsp"%>
  <!--  <a onclick=" clearCookieAll()" >退出</a> <a id="ssss"></a>   -->
 <div class="header">
			<div class="header-top">创建任务</div>
		</div>
		<div class="main">
			<div class="address">
				<div class="people">
					<h2></h2>
					<p>
						<img src="../img/2d.png" />
						<span></span>
					</p>
				</div>
				<a><i class="icon iconfont icon-gengduo"></i></a>
			</div>
			<div class="img"></div>
			<div class="num">
				<p>
					<span>售油桶数：</span>
					<input type="text" id="num" value="0"onfocus="if (value =='0'){value =''}"onblur="if (value ==''){value='0'}"/>
				</p>
				<hr />
				<p>
					<span>联系电话：</span>
					<input type="text" id="iphone" />
				</p>
			</div>
			<div class="remark">
				<p>备注：</p>
				<textarea id="textarea" onKeyDown="textdown(event)" onKeyUp="textup()" onfocus="if(value==''){value=''}" onblur="if (value ==''){value=''}" style="font-size: 0.25rem;color: #c2c2c2;    border-color: #e2e2e2;"></textarea>
			</div>
			<div class="prompt" style="background-color: #DDDDDD;">注：预约收油发布以后，我们会马上派车收油并及时通知你，请保持通话畅通</div>
		</div>
		<div class="bottom">
				<a class="sure" id="insertorders" onclick="insertorders()" >确认发布</a>
		</div>
 
 
	<!-- <div class="header">
		<div class="header-top">创建任务</div>
	</div>
	<div class="main">
		<div class="address">
			<div class="people">
				<h2></h2>
				<p>
					<img src="../img/address1@2x.png" /> <span></span>
				</p>
			</div>
			<a><i class="fa fa-angle-right"></i></a>
		</div>
		<div class="img"></div>
		<div class="num">
			<p>
				<span>售油桶数：</span> <input type="text" id="num" value="1"/>
			</p>
			<hr />
			<p>
				<span>联系电话：</span> <input type="text" id="iphone" />
			</p>
		</div>
		<div class="remark">
			<p>备注：</p>
			<textarea id="textarea" id="remark" onKeyDown="textdown(event)"
				onKeyUp="textup()" onfocus="if(value=='限字500'){value=''}"
				onblur="if (value ==''){value=''}"></textarea>
		</div>
		<div class="prompt">注：预约收油发布以后，我们会马上派车收油并及时通知你，请保持通话畅通</div>
	</div>
	<div class="bottom">
		<a class="sure" id="insertorders" onclick="insertorders()">确认发布</a>
	</div> -->
	<script type="text/javascript">
		$(function() {
			/* $("#ssss").html(getCookie("openid")); */
			   if (getCookie("mobiletokenuser") == "") {
				 location.href = "../weixinuser/appointment.jsp"
			} else {
				
			}   
		})
		function textdown(e) {
			textevent = e;
			if (textevent.keyCode == 8) {
				return;
			}
			if (document.getElementById('textarea').value.length >= 500) {
				if (!document.all) {
					textevent.preventDefault();
				} else {
					textevent.returnValue = false;
				}
			}
		}

		function textup() {
			var s = document.getElementById('textarea').value;
			//判断ID为text的文本区域字数是否超过100个 
			if (s.length > 500) {
				document.getElementById('textarea').value = s.substring(0, 500);
			}
		}
		$(function() {
			$(".people").children("h2").html("售油人:" + getCookie("realname"));
			$("#iphone").val((!getCookie("establishiphon") ||getCookie("establishiphon")=="undefined"? ""+getCookie("useriphone")+"" : ""+getCookie("establishiphon")+""));
			/* $("#textarea").val((!getCookie("establishremark") ||getCookie("establishremark")=="undefined"? "" : ""+getCookie("establishremark")+"")); */
			 getHistoryAddress(0); 
			$(".address").click(function() {
				var remark=$("#textarea").val();
				var num=$("#num").val();
				var iphone=$("#iphone").val();
				setcookie("establishnum", num, 30, "/");
				setcookie("establishiphon", iphone, 30, "/");
				setcookie("establishremark", remark, 30, "/");
				location.href = "../weixinuser/addresslist.jsp"
			})
		})
	</script>
</body>
</html>